
import requests
from retrying import retry




class HubScheduleApis:

    @retry(stop_max_attempt_number=5, wait_fixed=2000)
    @staticmethod
    def hub_schedule_handler(url, data):
        """
        公共处理
        :return:
        """
        resp = requests.post(url, json=data)
        if resp.status_code != 200:
            raise
        return resp.status_code,resp.json()
